﻿
using AutoMapper;
using BCCommon;
using BCCommon.Enums;
using BCDto.OA.WorkSchedule.WorkSchedule;
using BCDto.OA.WorkSchedule.WorkScheduleChildrenTask;
using BCEntity.OA.WorkSchedule.WorkSchedule;
using BCEntity.OA.WorkSchedule.WorkScheduleChildrenTask;
using BCService.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BCService.MapperProfiles.OA
{
    public class WorkScheduleProfile : Profile
    {
        public WorkScheduleProfile()
        {
            //工作进度表
            CreateMap<WorkScheduleDto, WorkScheduleEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkScheduleRequestDto, WorkSchedulePutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkScheduleRequestDto, WorkScheduleEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkSchedulePutDto, WorkScheduleEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkScheduleEntity, WorkScheduleDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //工作进度表子任务
            CreateMap<WorkScheduleChildrenTaskDto, WorkScheduleChildrenTaskEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkScheduleChildrenTaskRequestDto, WorkScheduleChildrenTaskPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkScheduleChildrenTaskRequestDto, WorkScheduleChildrenTaskEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkScheduleChildrenTaskPutDto, WorkScheduleChildrenTaskEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WorkScheduleChildrenTaskEntity, WorkScheduleChildrenTaskDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

        }
    }
}